package com.suning.boot.repository;

import com.suning.boot.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends JpaRepository<User,Long>{

//    @Query(value = "select * from t_user_01 where user_id = :userId",nativeQuery = true)
//    List<User> findById(@Param("userId") Long userId);


    List<User> findUserById(Long id);

}
